package com.kaguya.vams.mapper;

import com.kaguya.vams.domain.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author kaguya
 * @since 2021-07-28
 */
@Repository
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 根据用户id获取菜单权限id
     * @param userId
     * @return
     */
    List<Long> getNavMenuIdByUserId(Long userId);

    /**
     * 根据菜单id返回所有拥有该菜单权限的用户
     * @param menuId
     * @return
     */
    List<SysUser> getListByMenuId(Long menuId);
}
